package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface SetmealDishMapper {
    /**
     * 修改套餐(附表)
     * @param setmealDishes
     */
    void updateSetmealDish(List<SetmealDish> setmealDishes, Long setmealId);

    /**
     * 批量插入套餐菜品关系数据
     * @param setmealDishes
     * @param setmealId
     */
    void saveBatch(List<SetmealDish> setmealDishes, Long setmealId);

    /**
     * 根据id查询套餐
     * @param id
     * @return
     */
    List<SetmealDish> getByDishId(Long id);

    /**
     * 根据套餐id删除套餐菜品关系数据
     * @param setmealId
     */
    void deleteBySetmealId(Long setmealId);
}
